package com.qww.test04;

class Art {
    Art() {
        System.out.println("Art constructor");
    }
}

class Drawing extends Art {
    Drawing() {
        System.out.println("Drawing constructor");
    }
}

public class Cartoon extends Drawing {

    private String name;
    Cartoon() {
        System.out.println("Cartoon constructor");
    }

    Cartoon(String name) {
        System.out.println("Cartoon constructor " + name);
        this.name = name;
    }

    public static void main(String[] args) {
        // Cartoon cartoon1 = new Cartoon();
        Cartoon cartoon2 = new Cartoon("aaa");
    }
}

/* 运行结果
Art constructor
Drawing constructor
Cartoon constructor aaa
 */